<div id="wrapper">
    <div id="page-wrapper">
        <div class="panel panel-primary">
            <div class="panel-heading"><h5 class="panel-title"></h5></div>
            <div class="panel-body">
                <div id="toolbar" class="ms-toolbar">
                    <button id="toolbar-add" class="btn btn-danger" data-toggle="modal" data-target="#addrecommand">
                        <span class="glyphicon glyphicon-plus"></span> 增加
                    </button>
                </div>
                <div class="modal fade" id="addrecommand" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
                     aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"
                                        aria-hidden="true">&times;</button>
                                <h4 class="modal-title">增加漫友体验</h4>
                            </div>
                            <div class="modal-body">
                                <form id="addForm" class="form-horizontal">
                                    <div class="form-group">
                                        <label for="note_id" class="col-sm-2 control-label">帖子ID</label>

                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="note_id" name="note_id"
                                                   placeholder="必填项">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="sort" class="col-sm-2 control-label">排序</label>

                                        <div class="col-sm-10">
                                            <input type="text" class="form-control" id="sort" name="sort"
                                                   placeholder="必填项">
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="modal-footer">
                                <button id="close" type="button" class="btn btn-primary" data-dismiss="modal">关闭
                                </button>
                                <button id="add_confirm" type="button" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </div>
                </div>
                <table class="table table-bordered ">
                    <thead>
                    <th>ID</th>
                    <th>帖子ID</th>
                    <th>排序</th>
                    <th>操作</th>
                    </thead>
                    <tbody>
                    {%notempty name="data"%}
                    <tr>
                        {%volist name="data->all()" id="vo"%}
                        <td>{%$vo.id%}</td>
                        <td>{%$vo.note_id%}</td>
                        <td>{%$vo.sort%}</td>
                        <td style="width: 118px;">
                            <button class="delrecommand btn btn-danger btn-sm">删除</button>
                        </td>
                    </tr>
                    {%/volist%}
                    </tbody>
                </table>
                <div class="pull-right">
                    {%$data->render()%}
                </div>
                {%/notempty%}
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id='deleteModal' tabindex="-1" role="dialog">
    <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">确认删除</h4>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">取消</button>
                <button id="delete_confirm" type="button" class="btn btn-danger">确认</button>
            </div>
        </div>
    </div>
</div>
<script src="/static/home/widget/management/recommand/recommand.js"></script>
